package com.juku2024.juku.model;

import android.os.Parcel;
import android.os.Parcelable;

public class Genre implements Parcelable {
    public String name;
    public long id;
    public int genre_id;

    public Genre() {
    }

    public Genre(String name, long id, int genre_id) {
        this.name = name;
        this.id = id;
        this.genre_id = genre_id;
    }

    protected Genre(Parcel in) {
        name = in.readString();
        id = in.readLong();
        genre_id = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(name);
        dest.writeLong(id);
        dest.writeInt(genre_id);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<Genre> CREATOR = new Creator<Genre>() {
        @Override
        public Genre createFromParcel(Parcel in) {
            return new Genre(in);
        }

        @Override
        public Genre[] newArray(int size) {
            return new Genre[size];
        }
    };
}
